package com.sias.judgeservice.judge.codsandbox;

import com.sias.judgeservice.judge.codsandbox.impl.ExampleCodeSandbox;
import com.sias.judgeservice.judge.codsandbox.impl.RemoteCodeSandbox;
import com.sias.judgeservice.judge.codsandbox.impl.ThirdCodeSandbox;

/**
 * @author 吴文杰
 * @version 1.0
 * @since 2023/12/10 20:17
 */
public class CodeSandboxFactory {
  public static CodeSandbox newInstance(String type) {
    switch (type) {
      case "third":
        return new ThirdCodeSandbox();
      case "remote":
        return new RemoteCodeSandbox();
      case "example":
      default:
        return new ExampleCodeSandbox();
    }
  }
}
